<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml"> 
 
<head> 
	<meta http-equiv="Content-type" content="text/html; charset=utf-8" /> 
	<title>湖南省自来水公司营销管理信息系统</title> 
	<script src="../../../js/jquery/jquery-1.5.2.min.js"></script>
	<link rel="stylesheet" href="../../../css/reset.css" type="text/css" media="screen" title="no title" />
	<link rel="stylesheet" href="../../../css/text.css" type="text/css" media="screen" title="no title" />
	<link rel="stylesheet" href="../../../css/form.css" type="text/css" media="screen" title="no title" />
	<link rel="stylesheet" href="../../../css/buttons.css" type="text/css" media="screen" title="no title" />
	<link rel="stylesheet" href="../../../css/grid.css" type="text/css" media="screen" title="no title" />
	<link rel="stylesheet" href="../../../css/layout.css" type="text/css" media="screen" title="no title" />
	
	<link rel="stylesheet" href="../../../css/ui-darkness/jquery-ui-1.8.12.custom.css" type="text/css" media="screen" title="no title" />
	<link rel="stylesheet" href="../../../css/plugin/jquery.visualize.css" type="text/css" media="screen" title="no title" />
	<link rel="stylesheet" href="../../../css/plugin/facebox.css" type="text/css" media="screen" title="no title" />
	<link rel="stylesheet" href="../../../css/plugin/uniform.default.css" type="text/css" media="screen" title="no title" />
	<link rel="stylesheet" href="../../../css/plugin/dataTables.css" type="text/css" media="screen" title="no title" />
	
	<link rel="stylesheet" href="../../../css/custom.css" type="text/css" media="screen" title="no title">
    <style>
        .label{
            /*color: blue;*/
        }
    </style>
</head> 


   <script>
	   $(function () {

           var array=new Array();
	       <#list syEmpmenu as item>
		array.push(	${item.menuid})
		   </#list>
		$("input").each(function () {
			console.log(                $(this).val())
			<#--$.each(${syEmpmenu},function (i,val) {-->
				<#--console.log(i+"-----------"+val)-->

            <#--})-->
            for (var i = 0; i < array.length; i++) {   // 遍历权限
                if($(this).val()==array[i]){
                    $(this).attr("checked","checked")
                }
            }
        })
           var array1=[];
		    $("#baocun").click(function () {

                $("input").each(function () {
					if( $(this).is(":checked")){
					    console.log($(this).val()+"sssssssssssssssssssssssssssssssss")
						array1.push($(this).val())
					}
                })
				console.log(array1)

				$.ajax({
					type:"post",
                    url: "/syEmpmenupower/setmenu1",
                    data: {array1:array1.toString(),id:${syEmp.id}},
                    success: function (_data) {
                            console.log(_data)
						alert("设置权限成功")
                        window.history.back();
                    },
                    error:function () {
						console.log("请求失败")
                    }

                })

            })

		   $(".one").click(function () {
			    if($(this).is(":checked")){
				// 	console.log($(this).next("span").css("color","blue"))
                // $(this).next().next().children().attr("checked","checked")
			        // $("input:checkbox").css("display","none")
                    $(this).parent().parent().next().next().children().find("span").attr("class","checked");// 设置全选
                    $(this).parent().parent().next().next().children().find("input").attr("checked","checked");// 设置全选

				}
				else{
                    $(this).parent().parent().next().next().children().find("span").attr("class","");// 设置全选
                    $(this).parent().parent().next().next().children().find("input").attr("checked","");// 设置全选

                }
               // $(this).next().next().children().find("input").attr("checked1","checked1");

           })


       })

   </script>

<body> 

<div id="wrapper">
	
		
	
	<#include "../common/header.ftl"/>
	
	<div id="content" class="xgrid">
		
 		
		<div class="x12">
			
			<h2>设置菜单权限</h2>
			
			<div class="form label-inline uniform xgrid">
			
				<div class="field">
					<span class="bold">正在设置以下员工的菜单权限<span> <br/>
					<span class="red">注意：你正在编辑多个员工的菜单权限，不会显示这些员工的原有权限。
							<br/>仅仅在只编辑一个员工时，才会显示该员工的原有权限。</span>
				</div>
	
				<div class="field">
					<textarea class="medium" disabled="disabled" style="width:100%;height:50px;" />${syEmp.empname}

					</textarea>
				</div>

					<#--<#list syEmpmenu as item>-->
	<#--${item.menuid}-->
					<#--</#list>-->
				<div class="portlet x4">
					<div class="controlset field">
                        <input type="checkbox"  class="one" />
                        <span class="label">收费管理</span>
						<div class="controlset-pad">
							<input type="checkbox"  /><label for="check1">窗口收费</label><br />
							<input type="checkbox" /><label for="check2">批量收费</label><br />
							<input type="checkbox" /><label for="check3">收费作废</label><br />
							<input type="checkbox" /><label for="">减免用水量</label><br />
							<input type="checkbox" /><label for="">减免费用</label><br />
							<input type="checkbox" /><label for="">减免附加费</label><br />
							<input type="checkbox" /><label for="">减免违约金</label><br />
							<input type="checkbox" /><label for="">其它应收</label><br />
							<input type="checkbox" /><label for="">发票入库</label><br />
							<input type="checkbox" /><label for="">撤消入库</label><br />
							<input type="checkbox" /><label for="">发票出库</label><br />
							<input type="checkbox" /><label for="">撤消出库</label><br />
							<input type="checkbox" /><label for="">发票补开/作废</label><br />
							<input type="checkbox" /><label for="">发票出库情况查询</label><br />
							<input type="checkbox" /><label for="">收费人员发票查询</label><br />
							<input type="checkbox" /><label for="">发票交票情况查询</label><br />
							<input type="checkbox" /><label for="">发票使用情况查询</label><br />
							<input type="checkbox" /><label for="">销账汇总报表</label><br />
							<input type="checkbox" /><label for="">销账明细报表</label><br />
							<input type="checkbox" /><label for="">欠费报表</label><br />
							<input type="checkbox" /><label for="">收费情况报表</label><br />
							<input type="checkbox" /><label for="">月资金回收情况报表</label><br />
							<input type="checkbox" /><label for="">减免情况报表</label><br />
							<input type="checkbox" /><label for="">用户预收情况报表</label><br />
							<input type="checkbox" /><label for="">即将违约水费单</label><br />
							<input type="checkbox" /><label for="">已违约水费单</label><br />
							<input type="checkbox" /><label for="">已违约水费单(已结清)</label><br />
							<input type="checkbox" /><label for="">各类用水统计总表</label><br />
						</div>
					</div>
				</div>
				
				<div class="portlet x4">
					<div class="controlset field">
<input type="checkbox" value="1" class="one" />
						<span class="label">业扩工程</span>
						<div class="controlset-pad">
							<input type="checkbox" value="101"  /><label for="check1">用户申请</label><br />
							<input type="checkbox" value="102" /><label for="check2">初步审核</label><br />
							<input type="checkbox" value="103" /><label for="check3">交施工费</label><br />
							<input type="checkbox"  value="104"/><label for="">水费清算</label><br />
							<input type="checkbox"  value="105"/><label for="">供水协议</label><br />
							<input type="checkbox" value="106" /><label for="">施工竣工</label><br />
							<input type="checkbox" value="107" /><label for="">通水停水</label><br />
							<input type="checkbox"  value="108"/><label for="">档案存档</label><br />
							<input type="checkbox"  value="109"/><label for="">工商管理</label><br />
							<input type="checkbox"  value="110"/><label for="">终止工单</label><br />
							<input type="checkbox"  value="111"/><label for="">业扩工程进度</label><br />
							<input type="checkbox" value="112" /><label for="">业扩收费报表</label><br />
						</div>
					</div>
				</div>
				
				<div class="portlet x4">
					<div class="controlset field">
                        <input type="checkbox" value="2" class="one" />	<span class="label">用户管理</span>
						<div class="controlset-pad">
							<input type="checkbox" /><label for="check1">用户查询</label><br />
							<input type="checkbox" /><label for="check2">校户</label><br />
							<input type="checkbox" /><label for="check3">分户</label><br />
							<input type="checkbox" /><label for="">销户</label><br />
							<input type="checkbox" /><label for="">联系方式变更</label><br />
							<input type="checkbox" /><label for="">过户</label><br />
							<input type="checkbox" /><label for="">换表</label><br />
							<input type="checkbox" /><label for="">用水性质变更</label><br />
							<input type="checkbox" /><label for="">校户记录</label><br />
							<input type="checkbox" /><label for="">分户记录</label><br />
							<input type="checkbox" /><label for="">销户记录</label><br />
							<input type="checkbox" /><label for="">联系方式变更记录</label><br />
							<input type="checkbox" /><label for="">用户过户记录</label><br />
							<input type="checkbox" /><label for="">用户换表记录</label><br />
							<input type="checkbox" /><label for="">用水性质变更记录</label><br />
						</div>
					</div>
				</div>
				
				<div class="portlet x4">
					<div class="controlset field">
                        <input type="checkbox" value="3" class="one" />	<span class="label">抄表管理</span>
						<div class="controlset-pad">
							<input type="checkbox" value="301"/><label for="check1">表册管理</label><br />
							<input type="checkbox" value="302" /><label for="check2">抄表初始化</label><br />
							<input type="checkbox"  value="303"/><label for="check3">任务分配</label><br />
							<input type="checkbox" value="304"/><label for="">抄表录入</label><br />
							<input type="checkbox" value="305" /><label for="">抄表审核</label><br />
							<input type="checkbox" value="306" /><label for="">再次抄表录入</label><br />
							<input type="checkbox"value="307"  /><label for="">底码修正</label><br />
							<input type="checkbox" value="308"/><label for="">抄表情况查询</label><br />
							<input type="checkbox"value="309" /><label for="">抄表统计报表</label><br />
							<input type="checkbox" value="310" /><label for="">零吨位用户查询</label><br />
							<input type="checkbox" value="311"/><label for="">底码修正记录</label><br />
						</div>
					</div>
				</div>
				
				
				<div class="portlet x4">
					<div class="controlset field">
                        <input type="checkbox" value="6" class="one" />	<span class="label">系统管理</span>
						<div class="controlset-pad">
							<input type="checkbox" /><label for="check1">抄表辖区</label><br />
							<input type="checkbox" /><label for="check2">水表型号</label><br />
							<input type="checkbox" /><label for="check3">部门管理</label><br />
							<input type="checkbox" /><label for="">员工管理</label><br />
							<input type="checkbox" /><label for="">菜单权限设置</label><br />
							<input type="checkbox" /><label for="">辖区权限设置</label><br />
							<input type="checkbox" /><label for="">用水类型设定</label><br />
							<input type="checkbox" /><label for="">附加费设定</label><br />
							<input type="checkbox" /><label for="">违约金设定</label><br />
						</div>
					</div>
				</div>
				
			
				<div class="buttonrow">
					<button class="btn" id="baocun">保存</button>
					<button class="btn btn-grey" onClick="history.back();">返回</button>
				</div>
			</div>
			
		</div> <!-- .x12 -->
		
	</div> <!-- #content -->
	
	<div id="footer">		
		<div class="content_pad">			
			<p>&copy; 2013-11 版权所有 <a href="#">湖南省自来水公司</a>.   技术支持 <a href="#">华瑞教育</a>.</p>
		</div> <!-- .content_pad -->
	</div> <!-- #footer -->
	
</div> <!-- #wrapper -->

<script src="../../../js/jquery/jquery-1.5.2.min.js"></script>
<script src="../../../js/jquery/jquery-ui-1.8.12.custom.min.js"></script>
<script src="../../../js/misc/excanvas.min.js"></script>
<script src="../../../js/jquery/facebox.js"></script>
<script src="../../../js/jquery/jquery.visualize.js"></script>
<script src="../../../js/jquery/jquery.dataTables.min.js"></script>
<script src="../../../js/jquery/jquery.tablesorter.min.js"></script>
<script src="../../../js/jquery/jquery.uniform.min.js"></script>
<script src="../../../js/jquery/jquery.placeholder.min.js"></script>

<script src="../../../js/widgets.js"></script>
<script src="../../../js/dashboard.js"></script>

<script type="text/javascript">
	
$(document).ready ( function () 
{
	Dashboard.init ();		
});

</script>

</body> 
 
</html>